---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jetstream-publisher
spec:
  replicas: 1
  selector:
    matchLabels:
      name: jetstream-publisher
  template:
    metadata:
      labels:
        name: jetstream-publisher
      annotations:
        prometheus.io/scrape: 'true'
        prometheus.io/port: '8080'
        prometheus.io/scheme: 'http'
    spec:
      containers:
      - name: app
        image: jetstream_loadtest-publisher_image:latest
        ports:
        - containerPort: 8080
          name: metrics
        env:
        - name: PL_SERVER_TLS_CERT
          value: /certs/server.crt
        - name: PL_SERVER_TLS_KEY
          value: /certs/server.key
        - name: PL_CLIENT_TLS_CERT
          value: /certs/client.crt
        - name: PL_CLIENT_TLS_KEY
          value: /certs/client.key
        - name: PL_TLS_CA_CERT
          value: /certs/ca.crt
        volumeMounts:
        - name: certs
          mountPath: /certs
      volumes:
      - name: certs
        secret:
          secretName: service-tls-certs
